import Vue from 'vue'
import Router from 'vue-router'
import api from 'common/api'

Vue.use(Router)

var base = process.env.NODE_ENV === 'development' ? '/' : '/liveapp/';

var router = new Router({
  mode: 'history',
  base: base,
  routes: [{
      path: '/',
      name: 'menulist',
      redirect: 'homepage',
      meta: {
        name: '首页' 
      },
    },

    {
      path: '/homepage',
      name: 'homepage',
      meta: {
        name: '首页'
      },
      component: resolve => require(['views/homepage/index'], resolve)
    },
  ]
})

//配置基础模块连接 当连接为 html的时候  页面进行跳转
router.beforeEach((to, from, next) => {
  next();
})

export default router
